webpackJsonp([0],[
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

	var APP = __webpack_require__(1);
	var LIST = __webpack_require__(10);
	var REFRESH = __webpack_require__(11);
	var page = {
		is_pass:'',
		categoryid:'',
		type:'',//1考试 2练习
		ready: function() {
			var that = this;
			try{
				let lang =  api.getGlobalData({key: 'lang'})  || 'cn';
				i18n("[i18n]", {
					lang: lang,// 变更语言
					filePath: "i18n/",
					get: true
				});
			}catch(e){
				//TODO handle the exception
			}
			// 头部处理
			var headerHeight = $('#header').height();
			$('body').css('padding-top', headerHeight);
			// 下拉刷新
			REFRESH.refresh('.aui-refresh-content', function(res) {
				if(res.status == "success"){
					LIST.resetData();
				}
				setTimeout(function() {
					REFRESH.cancelLoading(); //隐藏下拉刷新
				}, 4000)
			})
			that.initData();
		},
		on: function() {
			var that = this;
			//批量事件start
			var events = [
				//打开页面
				['#add-channel', function() {

				}],
				// 关闭页面
				['#close', function() {
					APP.w.closeWin();
				}],
				// 搜索
				['#searchBtn', function() {
					that.getExamLog();
				}],
				// 重置
				['#reseat', function() {
					that.is_pass = '';
					that.categoryid = '';
					that.type = '';
					$('.date-box input').val('');
					$('.form-lis .select').removeClass('active');
					that.getExamLog();
				}],
				// 选择状态
				['.status-box .select', function() {
					$(this).addClass('active').siblings().removeClass('active');
					that.is_pass = $(this).data('type');
				}],
				// 选择分类
				['.type-box .select', function() {
					$(this).addClass('active').siblings().removeClass('active');
					that.type = $(this).data('type');
				}],
				// 选择科目
				['.object-box .select', function() {
					$(this).addClass('active').siblings().removeClass('active');
					that.categoryid = $(this).data('id');
				}]
			];
			APP.e.more(events);
			//批量事件end
			
			// 时间选择
			$('#start_date').on('focus', function() {
				$(this).trigger('blur');
			})
			$('#end_date').on('focus', function() {
				$(this).trigger('blur');
			})
			selectMonth('start_date');
			selectMonth('end_date');
			function selectMonth(startId){
				var myDate = new Date();
				var _year = myDate.getFullYear();//获取年
				var _name = 'calendar'+startId;
				_name = new datePicker();
				_name.init({
					'trigger': '#'+startId, /*按钮选择器，用于触发弹出插件*/
					'type': 'date',/*模式：date日期；datetime日期时间；time时间；ym年月；*/
					// 'minDate':(new Date().getFullYear()-2)+'-01',/*最小日期*/
					// 'maxDate':new Date().getFullYear()+'-'+(new Date().getMonth()+1),/*最大日期*/
					'onSubmit':function(){/*确认时触发事件*/
						$('#'+startId).val(_name.value);
					},
					'onClose':function(){/*取消时触发事件*/
					}
				});
			};
		},
		methods: {
			//加载数据
			initData: function() {
				var that = this;
				that.getCategoryList();
				that.getExamLog();
			},
			//查询数据
			getExamLog() {
				var that = this;
				var start_date = $('#start_date').val();
				var end_date = $('#end_date').val();
				var _date1 = new Date(start_date).getTime(); 
				var _date2 = new Date(end_date).getTime(); 
				let toast1 = i18n.get("select.start.time") || '请选择开始时间！';
				let toast2 = i18n.get("select.end.time") || '请选择结束时间！';
				let toast3 = i18n.get("select.start.end.time") || '结束时间不能小于开始时间！';
				if(start_date){
					if(!end_date){
						API.errorToast(toast2);
						return false;
					}
				}
				if(end_date){
					if(!start_date){
						API.errorToast(toast1);
						return false;
					}
				}
				if(_date2 - _date1 < 0 && start_date && end_date){
					API.errorToast(toast3);
					return false;
				}
				let params = {
					is_pass:that.is_pass,
					category:that.categoryid,
					type:that.type,
					start_time:start_date,
					end_time:end_date,
				}
				var api_url = 'exam/get_exam_log';
				var render = __webpack_require__(13);
				var renderBox = '#list-box';
				var emptyHtml = '';
				//list展示方式
				LIST.init({
					api: api_url,
					params: params,
					page:1,
					pageSize:15,//这个是服务器例如默认10个告诉你的，不传则默认是10个，给前端判断用的，只是为了测试请求6个
					// headRefresh:1,
					dataChildKey:'data',
					// debug:'empty',//调试数据为空显示
					// formatKey: 'works',//处理对象
					emptyHtml:emptyHtml,
					render: render,
					renderBox : renderBox,
					isCallback: 'all',
					success: function(res) {
						REFRESH.cancelLoading(); //隐藏下拉刷新
						// console.log('success:' + JSON.stringify(res) );
						// if(res.data.data.length < 10 && res.data.current_page > 1) {
						// 	$(".no-data").removeClass('hidden');
						// }else{
						// 	$(".no-data").addClass('hidden');
						// }
					}
				});
			},
			//获取分类
			getCategoryList() {
				var that = this;
				let _txt = i18n.get("select.account")
				APP.r.get({
					api: 'category/get_list',
					params: {},
					success: function(res) {
						var _data = res.data;
						$('#object-box').html(`<span i18="select.account">${_txt}</span>`);
						var _html = "";
						try{
							that.categoryId = _data[0].id;
							for (var i = 0; i < _data.length; i++) {
								_html += `<i class="select" data-id = "${_data[i].id}" >${_data[i].category}</i>`;
							}
						}catch(e){
							//TODO handle the exception
						}
						$('#object-box').append(_html);
					}
				});
			},
		}
	}
	API.run(page);


/***/ }),
/* 1 */,
/* 2 */,
/* 3 */,
/* 4 */,
/* 5 */,
/* 6 */,
/* 7 */,
/* 8 */,
/* 9 */,
/* 10 */
/***/ (function(module, exports, __webpack_require__) {

	var APP = __webpack_require__(1);
	var REFRESH = __webpack_require__(11);
	/**
	 * 数据列表类
	 * @type {Object}
	 */
	module.exports = {
		page:1,
	    pageHas:true,
	    obj: null,
		result:false,
		isscrolltobottom:false,//是否在下拉刷新
		reset:true,//可以重置
	    defaultEmptyHtml:'<div class="empty-box"><p>暂无数据</p></div>',
	    defaultEmptyHtml2:'<div class="empty-box"><p>No data</p></div>',
	    /**
	     * obj
	     * api:接口名称
	     * params:请求参数
	     * emptyHtml:数据为空的展示
	     * pageSize:每页显示数量
	     * render:模板对象，传入obj对象，例如var listTpl=require('./list')，则将listTpl传入
	     * renderBox:数据装载容器
	     * dataChildKey:json对象子数组，如果对象为data返回的不传入，例如res.data.list则传入'list'
	     * headRefresh:是否头部加载刷新 =1加载
	     * formatKey是否需要序列化
		 * debug 值为empty数据为空显示
		 * isCallback 是否回调all每次回调,one第一次回调
		 * success 回调函数
		 * renderExtraData 数据对象，附加到模板
		 * switchKey 示例list=works，比如共用一个模板A模板给出的是data.works，B模板给出的是data.list，模板中只能存在一个则A模板，需要转换数据data.list=data.works
	     * @type {Object}
		 * multistageChildKey dataChildKey 多级处理 比如'list.songs',
	     */
		init: function(obj,callback) {
			var that = this;
			if(!obj.emptyHtml) {
				let lang =  api.getGlobalData({key: 'lang'}) || 'cn';
				if(lang == 'cn'){
					obj.emptyHtml = this.defaultEmptyHtml;
				}else{
					obj.emptyHtml = this.defaultEmptyHtml2;
				}
	        }
	        if(!obj.pageSize) {
	        	obj.pageSize = 10;
	        }
	        that.obj = obj;
			if(obj.page){
				this.page = obj.page ? obj.page : this.page;
			}
			this.pageHas = true;
			this.getData(callback);
			//当滚动到底部
	        api.addEventListener({
	            name:'scrolltobottom',
	            extra:{
	                threshold:0            //设置距离底部多少距离时触发，默认值为0，数字类型
	            }
	        }, function(ret, err){ 
				if(that.result){
					that.isscrolltobottom = true;
					$('.mescroll-upwarp').show();
					that.getData();
				}
	        });
	        //判断是否有下拉刷新
	        if(obj.headRefresh==1) {
	            that.listenHeaderRefresh();
	        }
		},
		getData: function(callback) {
			var that = this;
	        this.obj.params.page = this.page;
			this.obj.params.limit_num = this.obj.pageSize ? this.obj.pageSize : 10; 
	        // console.log('数据：' +JSON.stringify(this.obj.params));
			that.result = false;
	        if(this.pageHas==true) {
	        	APP.r.get({
	        		api: this.obj.api,
	        		params : this.obj.params,
	        		success : function(ret) {
						// console.log('ret:'+ JSON.stringify(ret))
						// 返回数据
						that.render(ret);
		                if(that.obj.headRefresh==1) {
		                    //api.refreshHeaderLoadDone();
		                }
	        		}
	        	})
	        }
		},
		render:function(ret) {
	        this.result = false;
			this.isscrolltobottom = false;
			this.reset = true;
			
			$('.mescroll-upwarp').hide();//隐藏上拉加载
			if(this.obj.debug == 'empty') {
				if(this.obj.dataChildKey) {
				    ret.data[this.obj.dataChildKey] = [];
				} else {
				    ret.data = [];
				}
			}
			//如果有添加到模板的其他变量
			if(this.obj.renderExtraData) {
				$.extend(ret,this.obj.renderExtraData);
			}
			
			var dataArray = ret.data;
			//如果有switchKey
			if(this.obj.switchKey) {
				var switchKeyArr = this.obj.switchKey.split('=');
				if(switchKeyArr.length==2) {
					ret.data[switchKeyArr[0]] = ret.data[switchKeyArr[1]];
					// console.log("BBBB"+JSON.stringify(ret.data));
				}
			}
	        //如果有子项
			
			if(this.obj.multistageChildKey && this.obj.dataChildKey){
				var strs= new Array(); //定义一数组 
				strs=this.obj.dataChildKey.split("."); //字符分割 
				var dataArray = '';
				for (var i = 0; i < strs.length; i++) {
					dataArray += '['+[i]+']';
				}
				dataArray = dataArray;
			}
			
	        if(dataArray[this.obj.dataChildKey] && this.obj.dataChildKey) {
	        	dataArray = dataArray[this.obj.dataChildKey];
	        }
			
	        //检测是否有转换
	        if(this.obj.formatKey) {
	            var newDataArray = [];
	            for(var key in dataArray) {
	                var one = {};
	                one[this.obj.formatKey] = key;
	                one.list = dataArray[key];
	                newDataArray.push(one);
	            }
	            dataArray = newDataArray;
	            if(this.obj.dataChildKey) {
	                ret.data[this.obj.dataChildKey] = newDataArray;
	            } else {
	                ret.data = newDataArray;
	            }
	            // console.log("formatJSON:"+JSON.stringify(dataArray));
	        }
			
	        var renderBoxObj = this.obj.renderBox ? $(this.obj.renderBox) : $("#list-box");
	        if(!dataArray.hasOwnProperty('length') || !this.pageHas) {
	            this.result = false;
	        } else {
	            var length = dataArray.length;
				// console.log("dataJSON:"+JSON.stringify(ret));
				ret.page = this.page;
	            if(this.page <= 1) {
	                if(length == 0) {
						var F_Account = api.getPrefs({
										   sync: true,
										   key: 'F_Account'
										});
						// API.getStorage('F_Account');
						try{
							if(this.obj.frome == 'study' && F_Account == '13335111218'){
								var html = '<div class="list">\
												<div class="list-left">\
													<div class="name">邹莉芳</div>\
													<div class="dec">正在学习倒车入库</div>\
												</div>\
												<div class="list-right">\
													<div class="tell" data-tel = "13335111218">联系学员</div>\
												</div>\
											</div>\
											<div class="list">\
												<div class="list-left">\
													<div class="name">郝英豪</div>\
													<div class="dec">正在学习侧方位停车</div>\
												</div>\
												<div class="list-right">\
													<div class="tell" data-tel = "15665726317">联系学员</div>\
												</div>\
											</div>\
											<div class="list">\
												<div class="list-left">\
													<div class="name">姚子芸</div>\
													<div class="dec">正在学习倒车入库</div>\
												</div>\
												<div class="list-right">\
													<div class="tell" data-tel = "13335111218">联系学员</div>\
												</div>\
											</div>';
								renderBoxObj.html(html);
							}else{
								renderBoxObj.html(this.obj.emptyHtml);
							}
						}catch(e){
							//TODO handle the exception
							renderBoxObj.html(this.obj.emptyHtml);
						}
						
	                } else if(length < this.obj.pageSize){
	                    renderBoxObj.html( this.obj.render(ret) );
	                } else {
	                    renderBoxObj.html( this.obj.render(ret) );
	                    this.result = true;
	                }
	            } else {
	                if(length == this.obj.pageSize) {
	                    renderBoxObj.append( this.obj.render(ret) );
	                    this.result = true;
	                } else {
	                    renderBoxObj.append( this.obj.render(ret) );
	                }
	            }
				if(this.page == 1 && this.obj.isCallback == 'one'){
					if(this.obj.success) {
						$.isFunction(this.obj.success) && this.obj.success(ret);
					}
				}else if(this.obj.isCallback == 'all'){
					if(this.obj.success) {
						$.isFunction(this.obj.success) && this.obj.success(ret);
					}
				}
	        }
	        if(this.result==true) {
	            this.page++;
	        } else {
	            this.pageHas=false;
	        }
	    },
	    listenHeaderRefresh: function() {
	        var that = this;
	        API.refreshHeader(function() {
	            that.obj.headRefresh = 1;
	            that.resetData();
	        });
	    },
	    resetData:function() {
			if(!this.isscrolltobottom && this.reset){
				this.page = 1;
				this.pageHas = true;
				this.reset = false;
				this.getData();
			}else{
				REFRESH.cancelLoading(); //隐藏下拉刷新
				// API.errorToast("刷新失败，请稍后再试");
			}
	    },
	    resetParam: function(key,value) {
			var that = this;
	        //if(typeof key!='string' || typeof value!='string' || !key) {	// || !value
	        if(typeof key!='string' || !key) {    // 20200327修改
	            return this;
	        }
			this.obj.params[key] = value;
			that.resetData();
	        return this;
	    },
	    //更换模板，用于切换类型模板不一致
	    resetTpl: function(tpl) {
	        if(tpl) {
	            this.obj.render = tpl;
	        }
	        return this;
	    }
	}

/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

	__webpack_require__(12)
	module.exports = {
		pullRefresh:null,
		refresh: function(name, callback) {
			pullRefresh = new auiPullToRefresh({
				// container: document.querySelector('.aui-refresh-content'), //下拉容器
				container: document.querySelector(name), //下拉容器
				triggerDistance: 100 //下拉高度
			}, function(ret) {
				if (ret.status == "success") {
					
					$.isFunction(callback) && callback(ret);
				}else{
					$.isFunction(callback) && callback(ret);
				}
			})
		},
		// 隐藏刷新
		cancelLoading: function(){
			setTimeout(function(){
				pullRefresh.cancelLoading(); //隐藏下拉刷新
			},500)
		},
	}


/***/ }),
/* 12 */
/***/ (function(module, exports) {

	/**
	 * aui-pull-refresh.js
	 * @author 流浪男
	 * @todo more things to abstract, e.g. Loading css etc.
	 * Licensed under the MIT license.
	 * http://www.opensource.org/licenses/mit-license.php
	 */
	(function(window) {
		'use strict';
		/**
		 * Extend obj function
		 *
		 * This is an object extender function. It allows us to extend an object
		 * by passing in additional variables and overwriting the defaults.
		 */
		var auiPullToRefresh = function (params,callback) {
			this.extend(this.params, params);
			this._init(callback);
		}
		var touchYDelta;
		var isLoading = false;
		var docElem = window.document.documentElement,
			loadWrapH,
			win = {width: window.innerWidth, height: window.innerHeight},
			winfactor= 0.2,
			translateVal,
			isMoved = false,
			firstTouchY, initialScroll;
		auiPullToRefresh.prototype = {
			params: {
	            container: document.querySelector('.aui-refresh-content'),
				friction: 2.5,
				triggerDistance: 100,
				callback:false
	        },
	        _init : function(callback) {
				var self = this;
				var loadingHtml = '<div class="aui-refresh-load"><div class="aui-refresh-pull-arrow"></div></div>';
				self.params.container.insertAdjacentHTML('afterbegin', loadingHtml);
				self.params.container.addEventListener('touchstart', function(ev){
					self.touchStart(ev)
				});
				self.params.container.addEventListener('touchmove', function(ev){
					self.touchMove(ev)
				});
				self.params.container.addEventListener('touchend', function(ev){
					self.touchEnd(ev,callback);
				});
			},
			touchStart : function(ev) {
				// this.params.container.classList.remove("refreshing");
				if (isLoading) {
					return;
				}
				isMoved = false;
				this.params.container.style.webkitTransitionDuration =
			    this.params.container.style.transitionDuration = '0ms';
				touchYDelta = '';
				var touchobj = ev.changedTouches[0];
				// register first touch "y"
				firstTouchY = parseInt(touchobj.clientY);
				initialScroll = this.scrollY();
			},
			touchMove : function (ev) {
				if (isLoading) {
					ev.preventDefault();
					return;
				}
				var self = this;
				var moving = function() {
					var touchobj = ev.changedTouches[0], // reference first touch point for this event
						touchY = parseInt(touchobj.clientY);
						touchYDelta = touchY - firstTouchY;
					if ( self.scrollY() === 0 && touchYDelta > 0  ) {
						ev.preventDefault();
					}
					if ( initialScroll > 0 || self.scrollY() > 0 || self.scrollY() === 0 && touchYDelta < 0 ) {
						firstTouchY = touchY;
						return;
					}
					translateVal = Math.pow(touchYDelta, 0.85);
					self.params.container.style.webkitTransform = self.params.container.style.transform = 'translate3d(0, ' + translateVal + 'px, 0)';
					isMoved = true;
					if(touchYDelta > self.params.triggerDistance){
						self.params.container.classList.add("aui-refresh-pull-up");
						self.params.container.classList.remove("aui-refresh-pull-down");
					}else{
						self.params.container.classList.add("aui-refresh-pull-down");
						self.params.container.classList.remove("aui-refresh-pull-up");
					}
				};
				this.throttle(moving(), 20);
			},
			touchEnd : function (ev,callback) {
				var self =this;
				if (isLoading|| !isMoved) {
					isMoved = false;
					return;
				}
				// 根据下拉高度判断是否加载
				if( touchYDelta >= this.params.triggerDistance) {
					isLoading = true; //正在加载中
					ev.preventDefault();
					this.params.container.style.webkitTransitionDuration =
			    	this.params.container.style.transitionDuration = '300ms';
					this.params.container.style.webkitTransform =
					this.params.container.style.transform = 'translate3d(0,60px,0)';
					document.querySelector(".aui-refresh-pull-arrow").style.webkitTransitionDuration =
			    	document.querySelector(".aui-refresh-pull-arrow").style.transitionDuration = '0ms';
					self.params.container.classList.add("aui-refreshing");
					if(callback){
						callback({
							status:"success"
						});
					}
				}else{
					this.params.container.style.webkitTransitionDuration =
			    	this.params.container.style.transitionDuration = '300ms';
					this.params.container.style.webkitTransform =
					this.params.container.style.transform = 'none';
	//				this.params.container.style.transform = 'translate3d(0,0,0)';
					if(callback){
						callback({
							status:"fail"
						});
					}
				}
				isMoved = false;
				return;
			},
			cancelLoading : function () {
				var self =this;
				isLoading = false;
				self.params.container.classList.remove("aui-refreshing");
				document.querySelector(".aui-refresh-pull-arrow").style.webkitTransitionDuration =
			    	document.querySelector(".aui-refresh-pull-arrow").style.transitionDuration = '300ms';
				this.params.container.style.webkitTransitionDuration =
			    	this.params.container.style.transitionDuration = '0ms';
				self.params.container.style.webkitTransform =
				self.params.container.style.transform = 'none';
				self.params.container.classList.remove("aui-refresh-pull-up");
				self.params.container.classList.add("aui-refresh-pull-down");
				return;
			},
			scrollY : function() {
				return window.pageYOffset || docElem.scrollTop;
			},
			throttle : function(fn, delay) {
				var allowSample = true;
				return function(e) {
					if (allowSample) {
						allowSample = false;
						setTimeout(function() { allowSample = true; }, delay);
						fn(e);
					}
				};
			},
			winresize : function () {
				var resize = function() {
					win = {width: window.innerWidth, height: window.innerHeight};
				};
				throttle(resize(), 10);
			},
			extend: function(a, b) {
				for (var key in b) {
				  	if (b.hasOwnProperty(key)) {
				  		a[key] = b[key];
				  	}
			  	}
			  	return a;
			 }
		}
		window.auiPullToRefresh = auiPullToRefresh;

	})(window);

/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

	var $imports = __webpack_require__(14);
	module.exports = function ($data) {
	    'use strict';
	    $data = $data || {};
	    var $$out = '', $each = $imports.$each, data = $data.data, value = $data.value, i = $data.i, $escape = $imports.$escape;
	    $each(data.data, function (value, i) {
	        $$out += '\r\n\t<div class="history-con-lis">\r\n\t\t<ul>\r\n\t\t\t<li>';
	        $$out += $escape(value.category);
	        $$out += '</li>\r\n\t\t\t<li>';
	        $$out += $escape(value.extend.hand == 'right' ? '右手' : value.extend.hand == 'left' ? '左手' : value.extend.hand == 'both' ? '双手' : '-');
	        $$out += '</li>\r\n\t\t\t<li>';
	        $$out += $escape(value.do_point);
	        $$out += '</li>\r\n\t\t\t<li>';
	        $$out += $escape(value.time_point);
	        $$out += '</li>\r\n\t\t\t<li>';
	        $$out += $escape(value.point);
	        $$out += '</li>\r\n\t\t\t<li>';
	        $$out += $escape(value.exam_text);
	        $$out += '</li>\r\n\t\t\t<li>';
	        $$out += $escape(value.is_pass_text);
	        $$out += '</li>\r\n\t\t\t<li>';
	        $$out += $escape(value.end_time_text);
	        $$out += '</li>\r\n\t\t\t<li>\r\n\t\t\t\t';
	        if (value.category_id == 4) {
	            $$out += '\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<div>总共\uFF1A';
	            $$out += $escape(value.hit_error_times);
	            $$out += '</div>\r\n\t\t\t\t\t\t';
	            if (value.extend.left_hit_error_times > 0 || value.extend.left_hit_error_times === 0) {
	                $$out += '\r\n\t\t\t\t\t\t\t<div>左手\uFF1A';
	                $$out += $escape(value.extend.left_hit_error_times);
	                $$out += '</div>\r\n\t\t\t\t\t\t';
	            }
	            $$out += '\r\n\t\t\t\t\t\t';
	            if (value.extend.right_hit_error_times > 0 || value.extend.right_hit_error_times === 0) {
	                $$out += '\r\n\t\t\t\t\t\t\t<div>右手\uFF1A';
	                $$out += $escape(value.extend.right_hit_error_times);
	                $$out += '</div>\r\n\t\t\t\t\t\t';
	            }
	            $$out += '\r\n\t\t\t\t\t</div>\r\n\t\t\t\t';
	        } else {
	            $$out += '\r\n\t\t\t\t\t-\r\n\t\t\t\t';
	        }
	        $$out += '\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\t</div>\r\n';
	    });
	    return $$out;
	};

/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {

	'use strict';

	module.exports = __webpack_require__(15);

/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

	/* WEBPACK VAR INJECTION */(function(global) {'use strict';

	/*! art-template@runtime | https://github.com/aui/art-template */

	var detectNode = __webpack_require__(16);
	var runtime = Object.create(detectNode ? global : window);
	var ESCAPE_REG = /["&'<>]/;

	/**
	 * 编码模板输出的内容
	 * @param  {any}        content
	 * @return {string}
	 */
	runtime.$escape = function (content) {
	    return xmlEscape(toString(content));
	};

	/**
	 * 迭代器，支持数组与对象
	 * @param {array|Object} data 
	 * @param {function}     callback 
	 */
	runtime.$each = function (data, callback) {
	    if (Array.isArray(data)) {
	        for (var i = 0, len = data.length; i < len; i++) {
	            callback(data[i], i);
	        }
	    } else {
	        for (var _i in data) {
	            callback(data[_i], _i);
	        }
	    }
	};

	// 将目标转成字符
	function toString(value) {
	    if (typeof value !== 'string') {
	        if (value === undefined || value === null) {
	            value = '';
	        } else if (typeof value === 'function') {
	            value = toString(value.call(value));
	        } else {
	            value = JSON.stringify(value);
	        }
	    }

	    return value;
	};

	// 编码 HTML 内容
	function xmlEscape(content) {
	    var html = '' + content;
	    var regexResult = ESCAPE_REG.exec(html);
	    if (!regexResult) {
	        return content;
	    }

	    var result = '';
	    var i = void 0,
	        lastIndex = void 0,
	        char = void 0;
	    for (i = regexResult.index, lastIndex = 0; i < html.length; i++) {

	        switch (html.charCodeAt(i)) {
	            case 34:
	                char = '&#34;';
	                break;
	            case 38:
	                char = '&#38;';
	                break;
	            case 39:
	                char = '&#39;';
	                break;
	            case 60:
	                char = '&#60;';
	                break;
	            case 62:
	                char = '&#62;';
	                break;
	            default:
	                continue;
	        }

	        if (lastIndex !== i) {
	            result += html.substring(lastIndex, i);
	        }

	        lastIndex = i + 1;
	        result += char;
	    }

	    if (lastIndex !== i) {
	        return result + html.substring(lastIndex, i);
	    } else {
	        return result;
	    }
	};

	module.exports = runtime;
	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))

/***/ }),
/* 16 */
/***/ (function(module, exports) {

	/* WEBPACK VAR INJECTION */(function(global) {module.exports = false;

	// Only Node.JS has a process variable that is of [[Class]] process
	try {
	 module.exports = Object.prototype.toString.call(global.process) === '[object process]' 
	} catch(e) {}

	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))

/***/ })
]);